<layout name='layout_page' />
<link rel="stylesheet" href="<{:STATICS}>/centaurus/css/libs/timeline.css" type="text/css"/>

<div class="row">
	<div class="col-lg-12">
		<div class="row">
			<div class="col-lg-12">
				<ol class="breadcrumb">
					<li><a href="<{:U('Index/index')}>">Home</a></li>
					<li class="active"><span>Training plan</span></li>
				</ol>
				<h1>Training plan</h1>
			</div>
		</div>


		<div class="row">
			<div class="col-lg-8">
				<div class="main-box no-header clearfix">
					<div class="main-box-body clearfix">
						<form id="ajaxForm" action="<{:U('Appointment/update')}>" method="post" class="form-horizontal form-validata">
							<?php if($list['toID']==$userid){ ?>
							<div class="form-group menteesBase">
								<img src="<{$list['fromFace']|getFace=###}>">
								<p><{$list['fromName']}></p>
							</div>
							<?php }else{ ?>
							<div class="form-group menteesBase">
								<img src="<{$list['toFace']|getFace=###}>">
								<p><{$list['toName']}></p>
							</div>
							<?php } ?>	
							<div class="form-group">
								<label>Time</label>								
								<div class="input-group">
									<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
									<input type="text" class="form-control" id="time" name="time" value="<{$list['time']|date="m/d/Y",###}>" placeholder="Enter time" data-rule-required="true">
								</div>
							</div>
							<script> 
							$(function(){
								$("#time" ).datepicker({
									minDate: new Date()
								});
							});
							</script>
							<div class="form-group">
								<label>Address</label>								
								<div class="input-group">
									<span class="input-group-addon"><i class="fa fa-map-marker"></i></span>
									<input type="text" class="form-control" id="address" name="address" value="<{$list['address']}>" placeholder="Enter address" data-rule-required="true">
								</div>
							</div>
							<div class="form-group">
								<label for="exampleTextarea">Content</label>
								<textarea class="form-control" name="content" id="content" rows="5" data-rule-required="true"><{$list['content']}></textarea>
							</div>	
							<?php if($list['toID']==$userid){ ?>
							<div class="form-group">
								<label>Address</label>								
								<div class="radio">
									<input <eq name="list['status']" value="1">checked="checked"</eq> type="radio" name="status" id="optionsRadios1" value="1">
									<label for="optionsRadios1">passing</label>
								</div>
								<div class="radio">
									<input <eq name="list['status']" value="-1">checked="checked"</eq> type="radio" name="status" id="optionsRadios2" value="-1">
									<label for="optionsRadios2">rejected</label>
								</div>
							</div>
							<div class="form-group">
								<label>Reasons for refusal</label>
								<textarea class="form-control" name="remark" id="remark" rows="5" style="width:500px"><{$list['remark']}></textarea>
							</div>
							<?php } ?>	
							<div class="form-group">				
								<button type="submit" id="myBtn" class="btn btn-success">Edit Appointment</button>	
							</div>
							<input type="hidden" name="id" value="<{$list['id']}>">
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>